//package com.yyfax.pay.quartz.adapter.impl;
//
//import com.yyfax.framework.common.Log;
//import com.yyfax.pay.common.annotation.DepositQueryTaskType;
//import com.yyfax.pay.common.enums.FuiouBusiTypeEnum;
//import com.yyfax.pay.depository.domain.FuiouQueryTask;
//import com.yyfax.pay.order.data.service.ProtocolBindService;
//import com.yyfax.pay.quartz.adapter.DepositQueryHandlerAdapter;
//import com.yyfax.pay.quartz.model.vo.TaskResultVO;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.stereotype.Service;
//
//import javax.annotation.Resource;
//
//@Service
//@DepositQueryTaskType(FuiouBusiTypeEnum.PROTOCOL_BIND_CARD)
//public class FuiouProtocolBindQueryHandler implements DepositQueryHandlerAdapter {
//
//    private final Logger logger = LoggerFactory.getLogger(getClass());
//
//    @Resource
//    private ProtocolBindService protocolBindService;
//
//    @Override
//    public TaskResultVO handle(FuiouQueryTask task) throws Throwable {
//        final String OP = "FuiouProtocolBindQueryHandler.handle";
//        boolean isResult = protocolBindService.queryResult(task.getBusiId());
//        if (isResult) {
//            return new TaskResultVO(true);
//        }
//
//        if (task.getOptNo() >= task.getMaxNo()) {
//            logger.error(Log.op(OP).msg("协议卡查询达到最大次数，订单还未出结果。").kv("busiId", task.getBusiId()).toString());
//        }
//        return new TaskResultVO(false);
//    }
//}
